package com.aliyun.oss.mapper;

import com.aliyun.oss.pojo.User;
import com.aliyun.oss.pojo.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Insert("insert into user(username, password) VALUES (#{username}, #{password});")
//        @Insert("insert into user(username, password) VALUES ('test_user3', '123456');")
    void add(User user);

    @Select("SELECT * FROM user WHERE username=#{username} and password=#{password}")
    UserInfo userLogin(User user);
}
